package edu.dzxx.utils;

import java.text.DateFormatSymbols;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

/**
 * Created by ${纪雷} on 2020/05/21
 */
public class StrToData {
    public static Date strToData(String str) throws ParseException {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("YYYY-MM-dd HH:mm:ss",new DateFormatSymbols(Locale.US));
        Date dateTime = simpleDateFormat.parse(str);
        return dateTime;
    }
}
